//
//  HomeViewController.m
//  iread
//
//  Created by 朱经扬 on 15/12/15.
//  Copyright © 2015年 朱经扬. All rights reserved.
//

#import "HomeViewController.h"
#import "iread-Swift.h"
#import "HomeTableViewCell.h"
#import "BookButton.h"
@interface HomeViewController ()<BookButtonDelegate,UITableViewDataSource,UITableViewDelegate>

@property (weak, nonatomic) IBOutlet LineChart *lineView;
@property (weak, nonatomic) IBOutlet UITableView *tableView;

@end



@implementation HomeViewController

- (void)viewDidLoad {
    [super viewDidLoad];

    [self.navigationController setNavigationBarHidden:YES];
    
    [self.lineView show:nil dateArray:nil target:5 maxValue:20 numOfDays:30];
    
    self.tableView.delegate = self;
    self.tableView.dataSource = self;

}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return 3;
}

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
    return 1;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    static NSString *ID = @"cell";
    HomeTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];
    if(!cell) {
        cell = [[HomeTableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:ID];
    }
    
    [cell.bookButton updataBookButtonImageWithtopImage:[UIImage imageNamed:@"pic_book_00"]  bottomImage:[UIImage imageNamed:@"pic_book_00"]  middleImage:[UIImage imageNamed:@"pic_book_00"]  title:@"最近在读"];
    cell.backgroundColor = [UIColor clearColor];
    
    return cell;
}


@end
